﻿namespace Community.CsharpSqlite.Entity
{
    /*
    ** A single instruction of the virtual machine has an opcode
    ** and as many as three operands.  The instruction is recorded
    ** as an instance of the following structure:
    */

    public class union_p4
    {
        /* fourth parameter */
        public int[] ai; /* Used when p4type is P4Type.P4_INTARRAY */
        public int i; /* Integer value if p4type==P4Type.P4_INT32 */
        public object p; /* Generic pointer */
        public CollSeq pColl; /* Used when p4type is P4Type.P4_COLLSEQ */
        public FuncDef pFunc; /* Used when p4type is P4Type.P4_FUNCDEF */
        public dxDel pFuncDel; /* Used when p4type is P4_FUNCDEL */
        //public string z;           /* Pointer to data for string (char array) types */
        public long pI64; /* Used when p4type is P4Type.P4_INT64 */
        public KeyInfo pKeyInfo; /* Used when p4type is P4Type.P4_KEYINFO */
        public Mem pMem; /* Used when p4type is P4Type.P4_MEM */
        public SubProgram pProgram; /* Used when p4type is P4Type.P4_SUBPROGRAM */
        public double pReal; /* Used when p4type is P4Type.P4_REAL */
        public VdbeFunc pVdbeFunc; /* Used when p4type is P4Type.P4_VDBEFUNC */
        public VTable pVtab; /* Used when p4type is P4Type.P4_VTAB */
        public string z; // In C# string is unicode, so use byte[] instead
    };
}